Skip to content

Add AI policy to contribution guide#3959

Open
blnicho wants to merge 6 commits into
Pyomo:mainfrom
blnicho:ai-policy
Open

Add AI policy to contribution guide#3959
blnicho wants to merge 6 commits into
Pyomo:mainfrom
blnicho:ai-policy

Conversation

@blnicho
Copy link
Copy Markdown
Member

@blnicho blnicho commented May 19, 2026

Summary/Motivation:

This PR adds an AI contribution policy to our contributor guide based on discussions we've had at the Pyomo developer meetings. This is meant to be a "living" policy that will be regularly updated as the tools and our observations evolve. Feedback and comments are welcome.

Changes proposed in this PR:

  • Add AI contribution policy to the contributor guide
  • Update PR template with an "AI-Use Disclosure" section

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@blnicho blnicho requested review from jsiirola and mrmundt May 19, 2026 18:01
Comment thread doc/OnlineDocs/contribution_guide.rst Outdated
Comment thread doc/OnlineDocs/contribution_guide.rst Outdated
Comment thread doc/OnlineDocs/contribution_guide.rst Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.13%. Comparing base (2a8e709) to head (be9df8e).
⚠️ Report is 73 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3959      +/-   ##
==========================================
+ Coverage   90.11%   90.13%   +0.02%     
==========================================
  Files         908      909       +1     
  Lines      108378   109274     +896     
==========================================
+ Hits        97660    98492     +832     
- Misses      10718    10782      +64     
Flag Coverage Δ
builders 29.11% <ø> (-0.01%) ⬇️
default 86.09% <ø> (?)
expensive 35.14% <ø> (?)
linux 87.62% <ø> (-1.99%) ⬇️
linux_other 87.62% <ø> (+<0.01%) ⬆️
oldsolvers 28.07% <ø> (+<0.01%) ⬆️
osx 83.06% <ø> (+0.01%) ⬆️
win 85.37% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread .github/PULL_REQUEST_TEMPLATE.md
blnicho and others added 3 commits May 19, 2026 14:36
Co-authored-by: Miranda Mundt <55767766+mrmundt@users.noreply.github.com>
Co-authored-by: John Siirola <jsiirola@users.noreply.github.com>
Removed redundant instruction about marking PR review comments as resolved.
Review process:
- [ ] ALL AI-generated content was rewritten by the PR author
- [ ] ALL AI-generated content was thoroughly reviewed and verified by the PR author
- [ ] AI-generated content was contributed directly to the repository
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intent behind this line to check if "CoPilot did it for me"? If so, I wouldn't say it's entirely clear.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this section is meant to help us understand the extent to which the contributor reviewed the AI-generated content but this was a change suggested by @jsiirola so I'm hoping he'll also chime in.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original template was a request for free-response from the author. My concern is that they won't know what we are looking for and could write anything from a novel to the equivalent of "LGTM". The idea here is for a simple template to prompt them to to directly answer our most important questions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I agree 100% with the checklist. This specific line is hard to parse what it means, though. Does it mean, "I let copilot commit for me"?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh... right. The intent was to indicate that AI-generated code was included verbatim, potentially with no user involvement. My thinking at the time is that the "review process" should be a "radio button" (pick exactly one)... and the third option was a way of saying "none of the above" (and therefore volunteering the PR for summary closure).

The other thing that came to mind as I was reading the references that @blnicho circulated was that we should probably be concerned when any AI code is committed verbatim, as the copyright provenance of that code is ambiguous (e.g., did the AI regenerate copyrighted code it was trained on?)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is the "Review Process" section only for reviewers, or are submitters still supposed to be selecting something from there?

I would say, "None of us are lawyers, and the courts don't even know what's happening there. Let them figure it out and then we can adjust our terms." We already have the expectation of what license they need to be using when contributing here, and we will be covering our butts by introducing this policy at all (because we can have traceability into "PRs where AI was used").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants